/*
 * @Description:APP充值记录记录详情
 * @Author: tao.xie
 * @Date: 2019-03-18 14:05:36
 * @Last Modified by: tao.xie
 * @Last Modified time: 2019-03-19 17:41:14
 */

<template>
  <div
    id="app"
    class="flex-v flex-vc"
  >
    <comsume-detail-main
      :detail-icon="detailIcon"
      :detail-msg="detailMsg"
      :info-list="infoList"
    />
  </div>
</template>

<script>
import ConsumeDetailMain from '../components/ConsumeDetailMain'
// import Vue from 'vue'
import { getAPPRechargeDetail } from '../api/api.js'
import getInfoListDataByState from '../state/AppRechargeStateConstroller.js'
export default {
  name: 'App',
  components: {
    'comsume-detail-main': ConsumeDetailMain
  },
  data() {
    return {
      detailIcon: require('../assets/recharge.png'),
      detailMsg: '公交云卡充值',
      infoList: []
    }
  },
  mounted() {
    this.getDetail()
  },
  methods: {
    getDetail: async function() {
      try {
        // 充值成功的假数据
        let rs = await getAPPRechargeDetail('2018122713501846130')
        // 已提现的假数据
        // let rs = await getAPPRechargeDetail('2018122716253571130')
        this.infoList = getInfoListDataByState(rs)
      } catch (err) { }
    }
  }
}
</script>

<style>
.info {
  margin-top: 20px;
}
</style>
